import request from '@/utils/request'
import qs from 'qs'

export function sensTableAccDimRank(query) {
  return request({
    url: '/datascan/b/senstableaccess/sensTableAccDimRank',
    method: 'get',
    params: query
  })
}

export function querySensTableAccessList(params) {
  return request({
    url: '/datascan/b/senstableaccess/querySensTableAccessList',
    method: 'get',
    params
  })
}

export function queryAccessList(params) {
  return request({
    url: '/spread/detail/query',
    method: 'get',
    params
  })
}

export function getRankingDbStat(name) {
  return request({
    url: '/spread/ranking/db/stat',
    method: 'post',
    data:{
      dbName:name
    }
  })
}

export function getRankingTableStat(name) {
  return request({
    url: '/spread/ranking/table/stat',
    method: 'post',
    data:{
      tableName:name
    }
  })
}

export function getRankingLevelStat(name) {
  return request({
    url: '/spread/ranking/level/stat',
    method: 'post',
    data:{
      levelName:name
    }
  })
}

export function getRankingTypeStat(name) {
  return request({
    url: '/spread/ranking/type/stat',
    method: 'post',
    data:{
      typeName:name
    }
  })
}

export function getRankingSourceStat(name) {
  return request({
    url: '/spread/ranking/source/stat',
    method: 'post',
    data:{
      sourceIp:name
    }
  })
}
//敏感等级下拉
export function spreadCatatoryList(params) {
  return request({
    url: '/spread/spreadDateStat/spreadCatatoryList',
    method: 'get',
    params
  })
}
//敏感分类下拉
export function queryDataTypeTreeList(params) {
  return request({
    url: '/spread/detail/queryDataTypeTreeList',
    method: 'get',
    params
  })
}
